<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>

<%@ page session="false"%>
<html>
<head>
<title>Currents</title>
</head>
<body>
		<c:choose>
    		<c:when test="${empty results}">
    			Search didn't return any results.
    		</c:when>
			<c:otherwise>
				<b>Total results:</b>&nbsp;${fn:length(results)}
				<table>
					<c:forEach var="o" items="${results}">
						<tr>
							<td>${o.title}</td>
							<td>${o.address}</td>
							<td>${o.phone}</td>
						</tr>
					</c:forEach>
				</table>
			</c:otherwise>
		</c:choose>
</body>
</html>
